<% crlf=CHR(13)+CHR(10) SET CENTURY ON m_transid=orequest.form('thetransid') if isnull(m_transid) m_transid=orequest.querystring('t') endif theuser=orequest.querystring('user') pagetype=upper(orequest.querystring('pw')) *Pos Printer: 3 1/8" x 230' (approximately 80mm x 70m) *Format Width x Height (in mm) Width x Height (in inches) *A4 210 x 297 8.3 x 11.7 *A5 148 x 210 5.8 x 8.3 *A6 105 x 148 4.1 x 5.8 *A7 74 x 105 2.9 x 4.1 * * * * tpagewidth='210mm' do CASE case pagetype=[LET] tpagewidth='210mm' case pagetype=[A4] tpagewidth='210mm' case pagetype=[A5] tpagewidth='148mm' case pagetype=[A6] tpagewidth='105mm' case pagetype=[POS] tpagewidth='80mm' endcase if isnull(m_transid) tsql=[select top 1 x.*,IIF(VAL(x.transid)=0,VAL(SUBSTR(x.transid,2)),VAL(x.transid)) AS VTR, ] tsql=tsql+[ padl(allt(x.transid),9) as ptransid, y.name as acname ] tsql=tsql+[ from ("]+dbclocation+'payment.dbf'+[") x left join ("]+dbclocation+'accounts.dbf'+[") y ] tsql=tsql+[ on (x.customer=y.accountid) order by vtr desc, ptransid desc into cursor xtmpcur] else tsql=[select top 1 x.*,IIF(VAL(x.transid)=0,VAL(SUBSTR(x.transid,2)),VAL(x.transid)) AS VTR, ] tsql=tsql+[ padl(allt(x.transid),9) as ptransid, y.name as acname ] tsql=tsql+[ from ("]+dbclocation+'payment.dbf'+[") x left join ("]+dbclocation+'accounts.dbf'+[") y ] tsql=tsql+[ on (x.customer=y.accountid) order by vtr desc, ptransid desc ] tsql=tsql+[ where allt(transid)==']+allt(m_transid)+[' into cursor xtmpcur] endif &tsql SCATTER NAME SearchResults if TYPE('SearchResults.fbrinv')='C' and not ALLTRIM(SearchResults.fbrinv)=='0' and not EMPTY(SearchResults.fbrinv) fbrnumberreceived=allt(searchresults.fbrinv) else fbrnumberreceived=[] endif if empty(date) thedatestring=date() &&transform(date()) else thedatestring=date &&transform(dtoc(date)) endif openingbalance=[] if BETWEEN(val(left(SearchResults.customer,2)),1,8) and left(SearchResults.customer,3)<>'019' select sum(debit-credit) as dayopening from (dbclocation+[acctran]) where accountid=SearchResults.customer and date]+ALLTRIM(accounts.name)+[] =SEEK(SearchResults.depositid,[accounts],[accountid]) cdebitor=[] invnum=searchresults.transid ************* *=changeFieldStruc() ************* %>
<%if pagetype=[POS]%> <%= include("poshead.html")%> <%endif%> <%if pagetype=[A4]%> <%= include("A4head.html")%> <%endif%> <%if pagetype=[A5]%> <%= include("p5head.html")%> <%endif%> <%if pagetype=[LE]%> <%= include("A4head.html")%> <%endif%> <%if not empty(xcompany.fbrposid)%> <%endif%>
Receipt Voucher
Receipt#: <>Date: <>
<%if not empty(searchresults.discount)%> <%endif%> <%if not empty(searchresults.name)%> <%endif%> <%if not empty(searchresults.checkno)%> <%endif%> <%if not empty(searchresults.desc) and not allt(searchresults.desc)==allt(searchresults.name) and not allt(searchresults.desc)==[FROM ]+allt(searchresults.name)%> <%endif%>
Received<> <int(searchresults.amount),round(searchresults.amount,2),round(searchresults.amount,0))>> (<>)
Discount<> <int(searchresults.discount),round(searchresults.discount,2),round(searchresults.discount,0))>>
FromAC: <> Name <>
Payer<>
Cheaque#<>Date<>
details<>
<%if not empty(openingbalance)%> <%if not empty(nvl(closing.debits,0))%> <%endif%> <%if not empty(nvl(closing.Credits,0))%> <%endif%>
Opening<>
Add Debits<>
Less Credits<>
Closing Balance<>
<%endif%>